<form class="pageForm" onsubmit="return dialogCallback(this,selectTrees)">
	<div layoutH="37" style="overflow:auto;">
		<div class="templet">
			<li><a>${name}</a></li>
		</div>
		<ul class="tree treeFolder {type} expand" oncheck="treeChecked" ondblclick="$(this).parent().siblings('.formBar').find('button.ok').click()" action="/category/{category_id}/children" entity="{entity}" category_id="{category_id}"></ul>
	</div>
	<div class="formBar">
		<ul>
			<li><div class="buttonActive"><div class="buttonContent"><button type="submit" class="ok">确定</button></div></div></li>
			<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
		</ul>
	</div>
</form>
<script type="text/javascript">
	function treeChecked(item){
		//alert(item)
	}
	function selectTrees(form){
		var items=[];
		var $tree = $("ul.tree",form);
		if($tree.hasClass("treeCheck")){
			var $boxs=$(":checkbox[checked=true]",$tree);
			$boxs.each(function(){
				items[items.length] = $(this).parents("li").data("item");
			});
		}else if($tree.hasClass("treeRadio")){
			var $radio=$(":radio[checked=true]",$tree);
			items = $radio.parents("li").data("item");
		}
		return items;
		//alert(items);
	}
</script>